<template>
  <div class="pay-success">
    <h1>支付成功</h1>
    <el-result icon="success" title="成功提示" subTitle="请退出重新登入,以获取尊贵vip权限">
      <template slot="extra">
        <el-button type="primary" size="medium" @click="back">退出登录重新获得vip权限</el-button>
      </template>
    </el-result>
  </div>
</template>
<script>
    export default {
        methods: {
            back(){
                //清除token
                localStorage.removeItem("yz-token")
                //跳转到登录页 
                this.$router.push("/login")
                //刷新页面
                location.reload()
            }
        }
    }
</script>